import { Component } from "react";
import WithRouter from "../router/withRouter";

class Child extends Component{
    render(){
        return(
            <div>
                <h1>{this.props.name}</h1>
                <button onClick={()=>{
                    this.props.router.navigate(-1)
                }}>返回</button>
            </div>
        )
    }
}
export default WithRouter(Child);